import { createSlice } from "@reduxjs/toolkit";

export const counterSlice = createSlice({
  name: "counter",
  initialState: {
    schema: 'light',
  },
  reducers: {
    modifications: (state) => {
        state.schema = state.schema === 'light' ? 'dark' : 'light'
    },
  },
});
// 每个 case reducer 函数会生成对应的 Action creators
export const { modifications } = counterSlice.actions;

export default counterSlice.reducer;
